package com.island.service.bill;

import com.island.mapper.bill.BillMapper;
import com.island.pojo.Bill;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class BillServiceImpl implements BillService{

    @Autowired
    private BillMapper billMapper;

    public List<Bill> queryBillList(Map map) {

        return billMapper.queryBillList(map);
    }

    public Bill queryBillById(int id) {
        return billMapper.queryBillById(id);
    }

    public int addBill(Bill bill) {
        return billMapper.addBill(bill);
    }

    public int updateBill(Bill bill) {
        return billMapper.updateBill(bill);
    }

    public int deleteBillById(int id) {
        return billMapper.deleteBillById(id);
    }

    public int getBillCount(Map map) {
        return billMapper.getBillCount(map);
    }
}
